<template>
  <div class="recommend">
    <header>
      <span>爆款推荐</span>
    </header>
    <div class="list">
      <ul>
        <li v-for="item in recommendList" :key="item.id">
          <div class="status">{{item.status}}</div>
          <div class="img">
            <img
              :src="item.imgUrl"
              alt=""
            />
          </div>
          <div class="title">
            <div class="t-h">
              <h1>{{item.title}}</h1>
              <span>{{item.recommend}} </span>
            </div>
            <div class="t-p">
              <span>￥</span>
              <b>{{item.price}}</b>
            </div>
          </div>
        </li>
      </ul>
      <div class="banner">
        <img
          src="http://imgcon.tea7.com/6368627423498432697601522.jpg"
          alt=""
        />
      </div>
      <div class="inner">
        <div class="inner-l">
          <img
            src="http://img.tea7.com/0010445_0.jpeg?x-oss-process=image/resize,w_500"
            alt=""
          />
          <div class="title">
            <div class="name">建阳红色芝麻毫建盏茶具</div>
            <div class="price">
              <span>￥</span>
              <b>399</b>
            </div>
          </div>
        </div>
        <div class="inner-r">
          <div>MORE</div>
          <span>查看更多</span>
        </div>
      </div>
      <div class="floortitle">
        <header>
          <span>茶文化</span>
        </header>
        <ul>
          <li v-for="item in 2" :key="item">
            <div>
              <h1>好文精选</h1>
              <span>原创好文都在这</span>
            </div>
            <img
              src="http://imgcon.tea7.com/6363728602845403744544786.jpg"
              alt=""
            />
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props:['recommendList']
};
</script>

<style lang="less" scoped>
.recommend {
  width: 100%;
  header {
    padding: 0.4688rem 0;
    text-align: center;
    span {
      position: relative;
      text-align: center;
      font-size: 1.125rem;

      color: #333333;
    }
    span::after,
    span::before {
      content: "";
      position: absolute;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #d4c0a7;
      top: 50%;
      margin-top: -4px;
    }
    span::after {
      right: -20px;
    }
    span::before {
      left: -20px;
    }
  }
  .list {
    ul {
      li {
        position: relative;
        padding: 0 0.4688rem;
        margin-bottom: 0.4688rem;
        .status {
          position: absolute;
          left: 0.9375rem;
          top: 0;
          color: #fff;
          border-radius: 0 0 8px 8px;
          padding: 5px;
          background: #d4c0a7;
        }
        .img {
          width: 22.5rem;
          height: 9rem;
          img {
            width: 100%;
            height: 100%;
            border-radius: 8px;
          }
        }
        .title {
          position: absolute;
          top: 1.875rem;
          right: 15px;
          text-align: right;
          .t-h {
            h1 {
              color: #666666;
              font-size: 0.34rem;
            }
            span {
              overflow: hidden;
              text-overflow: ellipsis;
              display: -webkit-box;
              -webkit-line-clamp: 2;
              -webkit-box-orient: vertical;
              color: #333333;
              font-size: 0.9375rem;
            }
          }
          .t-p {
            margin-top: 10%;
            color: #b0352f;
            span {
              font-size: 0.75rem;
            }
          }
        }
      }
    }
    .banner {
      width: 100%;
      img {
        width: 100%;
      }
    }
    .inner {
      padding: 0.9375rem;
      display: flex;
      .inner-l {
        width: 8.1875rem;
        img {
          width: 8.1875rem;
        }
        .title {
          .name {
            font-size: 0.9375rem;
            padding: 8px 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }
          .price {
            text-align: center;
            color: #b0352f;
            span {
              font-size: 0.75rem;
            }
          }
        }
      }
      .inner-r {
        position: relative;
        background: #f3f3f3;
        width: 8.1875rem;
        height: 8.1875rem;
        margin-left: 1.25rem;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        font-size: 12px;
        div {
          width: 4.0625rem;
          text-align: center;
          padding-bottom: 0.3125rem;
          border-bottom: 1px solid #cccccc;
          color: #999999;
        }
        span {
          margin-top: 0.1875rem;
        }
      }
      .inner-r::after {
        content: "";
        position: absolute;
        margin: 5px;
        border: 1px solid #e4e4e4;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
      }
    }
    .floortitle {
      ul {
        display: flex;
        justify-content: space-between;
        li {
          position: relative;
          box-sizing: border-box;
          padding: 0 0.2344rem;
          overflow: hidden;
          width: 50%;
          img {
            width: 100%;
            border-radius: 8px;
          }
          div {
            position: absolute;
            top: 0;
            left: 0;
            color: #fff;
            padding: 0.7031rem 0 0 0.7031rem;
            box-sizing: border-box;
            h1 {
              font-size: 0.9375rem;
              color: #333333;
              font-weight: bold;
            }
            span {
              color: #999999;
              font-size: 0.75rem;
            }
          }
        }
      }
    }
  }
}
</style>